Skip to content

Conversation

@davidperezgar
Copy link
Member

Adds WTFPL (Do What The F*ck You Want To Public License) as a recognized GPL-compatible license in Plugin Check. The GNU license list marks WTFPL as GPL-compatible, but Plugin Check was flagging it as invalid.

Fixes #1157

Changes

  • Updated is_license_gpl_compatible() in includes/Traits/License_Utils.php:
    • Added WTFPL to the regex pattern for GPL-compatible licenses
  • Updated get_normalized_license() in includes/Traits/License_Utils.php:
    • Added normalization to convert WTFPL variations (e.g., "Do What The F*ck You Want To Public License") to "WTFPL"
  • Added test cases in tests/phpunit/tests/Traits/License_Utils_Tests.php:
    • Normalization tests for WTFPL variations
    • GPL compatibility tests for WTFPL
  • Added integration test in tests/phpunit/tests/Checker/Checks/Plugin_Header_Fields_Check_Tests.php:
    • test_run_with_valid_wtfpl_license() to verify WTFPL is accepted in plugin headers
  • Created test plugin test-plugin-wtfpl-license with WTFPL license for integration testing

Benefits

  • WTFPL is now recognized as GPL-compatible, aligning with the GNU license list
  • Reduces false positives for valid GPL-compatible licenses
  • Supports common WTFPL variations in plugin headers
  • Maintains existing validation for other licenses

Checklist

  • Code follows WordPress Coding Standards
  • Self-reviewed the code
  • Added necessary comments
  • No new linter errors
  • Added test cases to prevent regression
  • All existing tests pass
  • New tests pass
  • Integration test created and verified

@davidperezgar davidperezgar linked an issue Jan 16, 2026 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Jan 16, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: ernilambar <nilambar@git.wordpress.org>
Co-authored-by: frantorres <frantorres@git.wordpress.org>
Co-authored-by: nilovelez <nilovelez@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@davidperezgar davidperezgar self-assigned this Jan 16, 2026
@davidperezgar davidperezgar changed the title develop to add WTFPL license Accept WTFPL as a GPL-compatible license Jan 16, 2026
@ernilambar ernilambar added this to the 1.9.0 milestone Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WTFPL should be accepted as a GPL-compatible license

4 participants